home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
a_utils
/
ffccflow
/
ffccflow.lha
/
ffccc+flow
/
ffccc
/
NEXTIN.f
< prev
next >
Wrap
Text File
|
1992-07-31
|
710b
|
22 lines
FUNCTION NEXTIN(STRING,KFCH,KLCH)
*-----------------------------------------------------------------------
*
* returns as function value the integer extracted from string
* 'STRING' between KFCH and KLCH, by ignoring all non-numeric
* characters. default value is therefore 0.
*
*-----------------------------------------------------------------------
include 'PARAM.h'
CHARACTER *(*) STRING
include 'CONVEX.h'
N=0
*--- convert external zero into internal
NZERO=ICVAL('0')
*--- construct integer
DO 10 J=KFCH,KLCH
I=ICVAL(STRING(J:J))-NZERO
IF (I.GE.0.AND.I.LE.9) N=10*N+I
10 CONTINUE
NEXTIN=N
END